import { DateBaseEntity } from '@libs/common/entities';
import { Column, Entity } from 'typeorm';

@Entity('crm_node_ding_department_config')
export class DepartmentConfig extends DateBaseEntity {
  @Column({ comment: '部门编号', primary: true, unique: true })
  id: string;

  @Column({ comment: '部门名' })
  name: string;

  @Column('double', { comment: '比例', default: 0.5 })
  ratio: number = 0.5;

  @Column({ comment: '添加积分需要通知部门', default: 0 })
  addPointsNotice?: 0 | 1 = 0;

  @Column({ comment: '每日消费限制', default: 1600 })
  dayMaxPoints: number = 1600;

  @Column({ comment: '是否可以查询加班权限', default: 0 })
  enableOvertimeAuth?: 0 | 1 = 0;

  @Column({ comment: '状态', default: 1 })
  status?: 0 | 1 | number = 1;
}
